package com.thero.action;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;

import com.thero.domain.User;
import com.thero.service.RedisService;

@RequestMapping("/user")
@Controller
@Scope("prototype")	
public class InitSpringRedisController {
	@Autowired
	private RedisService redisService;
	
	@RequestMapping("/initRedis")
	public ModelAndView initRedis(){
		ModelAndView modelAndView = new ModelAndView();
		User user =new User();
		redisService.addData(user);
		return modelAndView;
	}
}
